<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>g++常见的编译参数 | linqinghuang</title>
  <meta name="keywords" content=" 编译 , g++ ">
  <meta name="description" content="g++常见的编译参数 | linqinghuang">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="能力定位perf工具常用于性能优化">
<meta name="keywords" content="性能优化">
<meta property="og:type" content="article">
<meta property="og:title" content="perf使用">
<meta property="og:url" content="http:&#x2F;&#x2F;yoursite.com&#x2F;2020&#x2F;03&#x2F;11&#x2F;%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96&#x2F;perf%E4%BD%BF%E7%94%A8&#x2F;index.html">
<meta property="og:site_name" content="linqinghuang">
<meta property="og:description" content="能力定位perf工具常用于性能优化">
<meta property="og:locale" content="en">
<meta property="og:updated_time" content="2020-03-10T16:08:46.246Z">
<meta name="twitter:card" content="summary">


<link rel="icon" href="/img/lin.png">

<link href="/css/style.css?v=1.0.1" rel="stylesheet">

<link href="/css/hl_theme/sublime.css?v=1.0.1" rel="stylesheet">

<link href="//cdn.bootcss.com/animate.css/3.5.2/animate.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="/js/jquery.autocomplete.min.js?v=1.0.1" ></script>

<script src="//cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>
<script>
    hljs.initHighlightingOnLoad();
</script>

<script src="//cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js"></script>



<script src="//cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js" ></script>

<script src="/js/iconfont.js?v=1.0.1" ></script>

</head>
<div style="display: none">
  <input class="theme_disqus_on" value="false">
  <input class="theme_preload_comment" value="false">
  <input class="theme_blog_path" value="">
</div>

<body>
<aside class="nav">
    <div class="nav-left">
        <a href="/" class="avatar_target">
    <img class="avatar" src="/img/lin.png" />
</a>
<div class="author">
    <span>linqinghuang</span>
</div>

<div class="icon">
    
</div>




<ul>
    <li><div class="all active">全部文章<small>(11)</small></div></li>
    
        
            
            <li><div data-rel="性能优化">性能优化<small>(1)</small></div>
                
            </li>
            
        
    
        
            
            <li><div data-rel="程序编译调试">程序编译调试<small>(6)</small></div>
                
            </li>
            
        
    
        
            
            <li><div data-rel="目标检测">目标检测<small>(1)</small></div>
                
            </li>
            
        
    
        
            
            <li><div data-rel="计算机视觉"><i class="fold iconfont icon-right"></i>计算机视觉<small>(2)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="精度测量及优化">精度测量及优化<small>(1)</small></div>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
        
    
</ul>
<div class="left-bottom">
    <div class="menus">
    
    
    </div>
    <div><a class="about  site_url"  href="/about">关于</a></div>
</div>
<input type="hidden" id="yelog_site_posts_number" value="11">

<div style="display: none">
    <span id="busuanzi_value_site_uv"></span>
    <span id="busuanzi_value_site_pv"></span>
</div>

    </div>
    <div class="nav-right">
        <div class="friends-area">
    <div class="friends-title">
        友情链接
        <i class="back-title-list"></i>
    </div>
    <div class="friends-content">
        <ul>
            
        </ul>
    </div>
</div>
        <div class="title-list">
    <form onkeydown="if(event.keyCode==13){return false;}">
        <input class="search" type="text" placeholder="Search..." autocomplete="off"id="local-search-input" >
        <i class="cross"></i>
        <span>
            <label for="tagswitch">Tags:</label>
            <input id="tagswitch" type="checkbox" style="display: none" />
            <i id="tagsWitchIcon"></i>
        </span>
    </form>
    <div class="tags-list">
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color5">性能优化</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color5">科学上网</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color1">v2ray</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color2">shadowsocks</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color5">目标检测</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color2">object detection</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color1">computer vision</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color4">gdb</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color3">调试</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color4">gcc</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color3">编译</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color4">g++</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color5">精度测量</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color4">mAP</a>
    </li>
    
    <div class="clearfix"></div>
</div>

    
    <nav id="title-list-nav">
        
        <a  class="性能优化 "
           href="/2020/03/11/%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/perf%E4%BD%BF%E7%94%A8/"
           data-tag="性能优化"
           data-author="" >
            <span class="post-title" title="perf使用">perf使用</span>
            <span class="post-date" title="2020-03-11 00:08:00">2020/03/11</span>
        </a>
        
        <a  class="程序编译调试 "
           href="/2019/12/10/%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/"
           data-tag="科学上网,v2ray,shadowsocks"
           data-author="" >
            <span class="post-title" title="科学上网">科学上网</span>
            <span class="post-date" title="2019-12-10 00:11:00">2019/12/10</span>
        </a>
        
        <a  class="目标检测 "
           href="/2020/03/10/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89/%E5%B8%B8%E8%A7%81%E7%9B%AE%E6%A0%87%E6%A3%80%E6%B5%8B%E7%AE%97%E6%B3%95/"
           data-tag="目标检测"
           data-author="" >
            <span class="post-title" title="常见目标检测算法">常见目标检测算法</span>
            <span class="post-date" title="2020-03-10 00:13:00">2020/03/10</span>
        </a>
        
        <a  class=""
           href="/2020/02/04/caffe/caffe%E7%9A%84%E7%BC%96%E8%AF%91%E4%BD%93%E7%B3%BB/"
           data-tag=""
           data-author="" >
            <span class="post-title" title="caffe的Makefile编译体系">caffe的Makefile编译体系</span>
            <span class="post-date" title="2020-02-04 07:51:05">2020/02/04</span>
        </a>
        
        <a  class="计算机视觉 "
           href="/2020/03/28/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89%E5%8F%91%E5%B1%95%E5%8E%86%E5%8F%B2%E5%9B%9E%E9%A1%BE/"
           data-tag="object detection,computer vision"
           data-author="" >
            <span class="post-title" title="计算机视觉发展历史回顾">计算机视觉发展历史回顾</span>
            <span class="post-date" title="2020-03-28 22:09:00">2020/03/28</span>
        </a>
        
        <a  class="程序编译调试 "
           href="/2020/03/14/%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%B0%83%E8%AF%95/gdb%E4%BD%BF%E7%94%A8/gdb%E8%BF%9B%E9%98%B6/"
           data-tag="gdb,调试"
           data-author="" >
            <span class="post-title" title="gdb进阶">gdb进阶</span>
            <span class="post-date" title="2020-03-14 23:41:00">2020/03/14</span>
        </a>
        
        <a  class="程序编译调试 "
           href="/2020/03/10/%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%B0%83%E8%AF%95/gdb%E4%BD%BF%E7%94%A8/%E4%BD%8D%E7%BD%AE%E6%97%A0%E5%85%B3%E4%BB%A3%E7%A0%81PIC/"
           data-tag="gcc,编译"
           data-author="" >
            <span class="post-title" title="位置无关代码PIC">位置无关代码PIC</span>
            <span class="post-date" title="2020-03-10 23:41:00">2020/03/10</span>
        </a>
        
        <a  class="程序编译调试 "
           href="/2020/03/10/%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%B0%83%E8%AF%95/gdb%E4%BD%BF%E7%94%A8/gdb%E5%9F%BA%E7%A1%80/"
           data-tag="gdb,调试"
           data-author="" >
            <span class="post-title" title="gcc和gdb基础">gcc和gdb基础</span>
            <span class="post-date" title="2020-03-10 23:41:00">2020/03/10</span>
        </a>
        
        <a  class="程序编译调试 "
           href="/2020/03/10/%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%B0%83%E8%AF%95/gdb%E4%BD%BF%E7%94%A8/g++%E7%BC%96%E8%AF%91%E5%B8%B8%E8%A7%81%E7%9A%84%E7%BC%96%E8%AF%91%E5%8F%82%E6%95%B0/"
           data-tag="编译,g++"
           data-author="" >
            <span class="post-title" title="g++常见的编译参数">g++常见的编译参数</span>
            <span class="post-date" title="2020-03-10 23:41:00">2020/03/10</span>
        </a>
        
        <a  class="程序编译调试 "
           href="/2020/03/14/%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%B0%83%E8%AF%95/gdb%E4%BD%BF%E7%94%A8/gdb%E9%AB%98%E9%98%B6/"
           data-tag="gdb,调试"
           data-author="" >
            <span class="post-title" title="gdb高阶">gdb高阶</span>
            <span class="post-date" title="2020-03-14 23:41:00">2020/03/14</span>
        </a>
        
        <a  class="计算机视觉 精度测量及优化 "
           href="/2020/03/10/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89/%E7%B2%BE%E5%BA%A6%E6%B5%8B%E9%87%8F%E5%8F%8A%E4%BC%98%E5%8C%96/mAP/"
           data-tag="目标检测,精度测量,mAP"
           data-author="" >
            <span class="post-title" title="mAP">mAP</span>
            <span class="post-date" title="2020-03-10 00:13:00">2020/03/10</span>
        </a>
        
    </nav>
</div>
    </div>
    <div class="hide-list">
        <div class="semicircle">
            <div class="brackets first"><</div>
            <div class="brackets">&gt;</div>
        </div>
    </div>
</aside>
<div class="post">
    <div class="pjax">
        <article id="post-程序编译调试/gdb使用/g++编译常见的编译参数" class="article article-type-post" itemscope itemprop="blogPost">
    
        <h1 class="article-title">g++常见的编译参数</h1>
    
    <div class="article-meta">
        
        
        
        <span class="book">
            
                <a href="javascript:" target="_blank" data-rel="程序编译调试 noopener">程序编译调试</a>
            
        </span>
        
        
        <span class="tag">
            
            <a href="javascript:" target="_blank" rel="noopener" class="color3">编译</a>
            
            <a href="javascript:" target="_blank" rel="noopener" class="color4">g++</a>
            
        </span>
        
    </div>
    <div class="article-meta">
        
        创建时间:<time class="date" title='更新时间: 2020-03-13 23:52:18'>2020-03-10 23:41</time>
        
    </div>
    <div class="article-meta">
        
        
        <span id="busuanzi_container_page_pv">
            阅读:<span id="busuanzi_value_page_pv">
                <span class="count-comment">
                    <span class="spinner">
                      <div class="cube1"></div>
                      <div class="cube2"></div>
                    </span>
                </span>
            </span>
        </span>
        
        
        <span class="top-comment" title="跳转至评论区">
            <a href="#comments">
                评论:<span class="count-comment">
                    <span class="spinner">
                      <div class="cube1"></div>
                      <div class="cube2"></div>
                    </span>
                </span>
            </a>
        </span>
        
    </div>
    
    <div class="toc-ref">
    
        <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#1-研究思路"><span class="toc-text">1. 研究思路</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#1-1-目录翻译"><span class="toc-text">1.1 目录翻译</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2-几个有趣的知识点"><span class="toc-text">2. 几个有趣的知识点</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#3-常用编译参数"><span class="toc-text">3. 常用编译参数</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#告警相关"><span class="toc-text">告警相关</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#文件生成相关"><span class="toc-text">文件生成相关</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#链接相关"><span class="toc-text">链接相关</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#其他"><span class="toc-text">其他</span></a></li></ol></li></ol>
    
<style>
    .left-col .switch-btn,
    .left-col .switch-area {
        display: none;
    }
    .toc-level-3 i,
    .toc-level-3 ol {
        display: none !important;
    }
</style>
</div>
    
    <div class="article-entry" itemprop="articleBody">
      
        <font face="楷体">

<h1 id="1-研究思路"><a href="#1-研究思路" class="headerlink" title="1. 研究思路"></a>1. 研究思路</h1><p>由于信息传递会有不可避免的失真，所以研究g++最好的资料就是GNU官网提供的手册。<br>《Using the GNU Compiler Collection》<br><br>这份资料详细记录了GNU编译器所有功能选项，总共992页，内容太多。人的精力是有限的，知识的海洋是无限的。<br><br>本文翻译罗列手册（版本为9.2.0）的目录，摘录几个有趣的知识点，介绍几个常用编译参数。</p>
<h2 id="1-1-目录翻译"><a href="#1-1-目录翻译" class="headerlink" title="1.1 目录翻译"></a>1.1 目录翻译</h2><table>
<thead>
<tr>
<th>原文</th>
<th>翻译</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>Introduction</td>
<td>介绍</td>
<td>介绍了本手册所覆盖内容</td>
</tr>
<tr>
<td>Programming Languages Supported by GCC</td>
<td>GCC所支持的编程语言</td>
<td>编程语言支持表，主要还是C系，我C系无敌</td>
</tr>
<tr>
<td>Language Standards Supported by GCC</td>
<td>GCC所支持的语言标准</td>
<td>阐述各种语言的ISO标准</td>
</tr>
<tr>
<td>GCC Command Options</td>
<td>GCC 命令行选项</td>
<td>介绍了诸多命令行选项的功能</td>
</tr>
<tr>
<td>C Implementation-Defined Behavior</td>
<td>介绍</td>
<td>无</td>
</tr>
<tr>
<td>C++ Implementation-Defined Behavior</td>
<td>介绍</td>
<td>无</td>
</tr>
<tr>
<td>Extensions to the C Language Family</td>
<td>C语言家族扩展</td>
<td>无</td>
</tr>
<tr>
<td>Extensions to the C++ Language</td>
<td>C++语言家族扩展</td>
<td>无</td>
</tr>
<tr>
<td>GNU Objective-C Features</td>
<td>OC的一些特性</td>
<td>无</td>
</tr>
<tr>
<td>Binary Compatibility</td>
<td>二进制兼容性</td>
<td>无</td>
</tr>
<tr>
<td>gcov a Test Coverage Program</td>
<td>gcov工具</td>
<td>配合gcc可以进行代码覆盖率测试</td>
</tr>
<tr>
<td>gcov-tool an Offline Gcda Profile Processing Tool</td>
<td>gcov-tool</td>
<td>无</td>
</tr>
<tr>
<td>gcov-dump—an Offline Gcda and Gcno Profile Dump Tool</td>
<td>介绍</td>
<td>无</td>
</tr>
<tr>
<td>Known Causes of Trouble with GCC</td>
<td>介绍</td>
<td>无</td>
</tr>
<tr>
<td>Reporting Bugs</td>
<td>问题报告</td>
<td>无</td>
</tr>
<tr>
<td>How To Get Help with GCC</td>
<td>如何帮助GCC</td>
<td>无</td>
</tr>
<tr>
<td>Contributing to GCC Development</td>
<td>参与GCC开发</td>
<td>无</td>
</tr>
<tr>
<td>Funding Free Software</td>
<td>自由软件基金会</td>
<td>无</td>
</tr>
<tr>
<td>The GNU Project and GNU/Linux</td>
<td>GNU项目和GNU/Linux</td>
<td>无</td>
</tr>
<tr>
<td>GNU General Public License</td>
<td>许可</td>
<td>无</td>
</tr>
<tr>
<td>GNU Free Documentation License</td>
<td>许可</td>
<td>无</td>
</tr>
<tr>
<td>Contributors to GCC</td>
<td>GCC的贡献者名单</td>
<td>无</td>
</tr>
<tr>
<td>Option Index</td>
<td>配置选项索引</td>
<td>无</td>
</tr>
<tr>
<td>Keyword Index</td>
<td>关键字索引</td>
<td>无</td>
</tr>
</tbody></table>
<h1 id="2-几个有趣的知识点"><a href="#2-几个有趣的知识点" class="headerlink" title="2. 几个有趣的知识点"></a>2. 几个有趣的知识点</h1><ol>
<li>GCC支持1998年发布的最早的ISO C++98，</li>
<li>GCC支持现代C++标准，包括2011、2014和2017的修订版（也就是C++11、C++14、C++17）</li>
<li>使用-std=c++xx选项即可指定标准</li>
<li>在GCC 9.2.0上默认的标准是gnu++14</li>
<li>程序编译过程主要有4个步骤：预处理（preprocessing）、编译（compilation）、汇编（assembly）、链接（linking）</li>
<li>GCC支持的可选参数涵盖以上4个步骤</li>
<li>GCC可以只输出上面4个步骤的任一阶段的输出</li>
<li>GCC可以关闭或者打开告警</li>
<li>位置无关代码（PIC,Position Independent code）</li>
</ol>
<h1 id="3-常用编译参数"><a href="#3-常用编译参数" class="headerlink" title="3. 常用编译参数"></a>3. 常用编译参数</h1><h2 id="告警相关"><a href="#告警相关" class="headerlink" title="告警相关"></a>告警相关</h2><p>-Werror 所有的告警都输出为错误<br><br>-Wfatal-errors 第一次出错时就立即中断程序编译，不再继续编译和打印更多错误信息<br></p>
<h2 id="文件生成相关"><a href="#文件生成相关" class="headerlink" title="文件生成相关"></a>文件生成相关</h2><p>-g 生成将操作系统原生支持的debugging信息。GDB可以用此信息进行调试。<br><br>该选项支持不同级别的调试，Level3包括了程序中的宏定义信息<br><br>-D 用于给程序中添加宏定义， -D macro=string，等价于在头文件中定义：#define macro string<br><br>-o file 将输出存储到file中<br><br>-E 在预处理阶段之后停止，不进行编译，直接输出预处理结果。输出cpp程序的预处理结果，便于看清复杂宏定义含义<br><br>-S 在编译后停止，不进行汇编。输出的是汇编代码<br><br>-c 编译或者汇编代码，但不进行链接<br></p>
<h2 id="链接相关"><a href="#链接相关" class="headerlink" title="链接相关"></a>链接相关</h2><p>-l 小写l，手动链接库文件。比如 -lm 用于手动链接数学库libm.a<br><br>-fPIC 用于生成位置无关代码，通常和-shared一起使用，用于生成动态库文件<br><br>-shared 用于生成动态库文件<br></p>
<h2 id="其他"><a href="#其他" class="headerlink" title="其他"></a>其他</h2><p>-v 显示版本<br><br>–help 显示帮助信息<br><br>-std 指定使用语言版本<br></p>
</font>
      
       <hr><span style="font-style: italic;color: gray;"> 转载请注明来源，欢迎对文章中的引用来源进行考证 </span>
    </div>
</article>



<div class="article_copyright">
    <p><span class="copy-title">文章标题:</span>g++常见的编译参数</p>
    
    <p><span class="copy-title">本文作者:</span><a href="javascript:void(0)" target="_blank" rel="noopener" title="linqinghuang">linqinghuang</a></p>
    <p><span class="copy-title">发布时间:</span>2020-03-10, 23:41:00</p>
    <p><span class="copy-title">最后更新:</span>2020-03-13, 23:52:18</p>
    <span class="copy-title">原始链接:</span><a class="post-url" href="/2020/03/10/%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%B0%83%E8%AF%95/gdb%E4%BD%BF%E7%94%A8/g++%E7%BC%96%E8%AF%91%E5%B8%B8%E8%A7%81%E7%9A%84%E7%BC%96%E8%AF%91%E5%8F%82%E6%95%B0/" title="g++常见的编译参数">http://yoursite.com/2020/03/10/%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%B0%83%E8%AF%95/gdb%E4%BD%BF%E7%94%A8/g++%E7%BC%96%E8%AF%91%E5%B8%B8%E8%A7%81%E7%9A%84%E7%BC%96%E8%AF%91%E5%8F%82%E6%95%B0/</a>
    <p>
        <span class="copy-title">版权声明:</span><i class="fa fa-creative-commons"></i> <a rel="license noopener" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" title="CC BY-NC-SA 4.0 International" target = "_blank">"署名-非商用-相同方式共享 4.0"</a> 转载请保留原文链接及作者。
    </p>
</div>



    <div id="comments"></div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">

<script type="text/javascript">
    $.getScript('/js/gitalk.js', function () {
        var gitalk = new Gitalk({
            clientID: '',
            clientSecret: '',
            repo: 'linqinghuang.github.io',
            owner: 'linqinghuang',
            admin: ['linqinghuang'],
            id: decodeURI(location.pathname),
            distractionFreeMode: 'true',
            language: 'zh-CN',
            perPage: parseInt('10',10)
        })
        gitalk.render('comments')
    })
</script>




    




    </div>
    <div class="copyright">
        <p class="footer-entry">© linqinghuang</p>
<p class="footer-entry">Built with <a href="https://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/yelog/hexo-theme-3-hexo" target="_blank">3-hexo</a> theme</p>

    </div>
    <div class="full-toc">
        <button class="full"><span class="min "></span></button>
<button class="post-toc-menu"><span class="post-toc-menu-icons"></span></button>
<div class="post-toc"><span class="post-toc-title">目录</span>
    <div class="post-toc-content">

    </div>
</div>
<a class="" id="rocket" href="javascript:void(0)" target="_blank" rel="noopener"></a>
    </div>
</div>
<div class="acParent"></div>

</body>
<script src="/js/jquery.pjax.js?v=1.0.1" ></script>

<script src="/js/script.js?v=1.0.1" ></script>
<script>
    var img_resize = 'default';
    /*作者、标签的自动补全*/
    $(function () {
        $('.search').AutoComplete({
            'data': ['#性能优化','#科学上网','#v2ray','#shadowsocks','#目标检测','#object detection','#computer vision','#gdb','#调试','#gcc','#编译','#g++','#精度测量','#mAP',],
            'itemHeight': 20,
            'width': 418
        }).AutoComplete('show');
    })
    function initArticle() {
        /*渲染对应的表格样式*/
        
            $(".post .pjax table").addClass("green_title");
        

        /*渲染打赏样式*/
        

        /*高亮代码块行号*/
        
        $('pre code').each(function(){
            var lines = $(this).text().split('\n').length - 1, widther='';
            if (lines>99) {
                widther = 'widther'
            }
            var $numbering = $('<ul/>').addClass('pre-numbering ' + widther).attr("unselectable","on");
            $(this).addClass('has-numbering ' + widther)
                    .parent()
                    .append($numbering);
            for(var i=1;i<=lines;i++){
                $numbering.append($('<li/>').text(i));
            }
        });
        

        /*访问数量*/
        
        $.getScript("//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js");
        

        /*代码高亮，行号对齐*/
        $('.pre-numbering').css('line-height',$('.has-numbering').css('line-height'));

        
    }

    /*打赏页面隐藏与展示*/
    

</script>

<!--加入行号的高亮代码块样式-->

<style>
    pre{
        position: relative;
        margin-bottom: 24px;
        border-radius: 10px;
        border: 1px solid #e2dede;
        background: #FFF;
        overflow: hidden;
    }
    code.has-numbering{
        margin-left: 30px;
    }
    code.has-numbering.widther{
        margin-left: 35px;
    }
    .pre-numbering{
        margin: 0px;
        position: absolute;
        top: 0;
        left: 0;
        width: 20px;
        padding: 0.5em 3px 0.7em 5px;
        border-right: 1px solid #C3CCD0;
        text-align: right;
        color: #AAA;
        background-color: ;
    }
    .pre-numbering.widther {
        width: 35px;
    }
</style>

<!--自定义样式设置-->
<style>
    
    
    .nav {
        width: 542px;
    }
    .nav.fullscreen {
        margin-left: -542px;
    }
    .nav-left {
        width: 120px;
    }
    
    
    @media screen and (max-width: 1468px) {
        .nav {
            width: 492px;
        }
        .nav.fullscreen {
            margin-left: -492px;
        }
        .nav-left {
            width: 100px;
        }
    }
    
    
    @media screen and (max-width: 1024px) {
        .nav {
            width: 492px;
            margin-left: -492px
        }
        .nav.fullscreen {
            margin-left: 0;
        }
        .nav .hide-list.fullscreen {
            left: 492px
        }
    }
    
    @media screen and (max-width: 426px) {
        .nav {
            width: 100%;
        }
        .nav-left {
            width: 100%;
        }
    }
    
    
    .nav-right .title-list nav a .post-title, .nav-right .title-list #local-search-result a .post-title {
        color: #383636;
    }
    
    
    .nav-right .title-list nav a .post-date, .nav-right .title-list #local-search-result a .post-date {
        color: #5e5e5f;
    }
    
    
    .nav-right nav a.hover, #local-search-result a.hover{
        background-color: #e2e0e0;
    }
    
    

    /*列表样式*/
    
    .post .pjax article .article-entry>ol, .post .pjax article .article-entry>ul, .post .pjax article>ol, .post .pjax article>ul{
        border: #e2dede solid 1px;
        border-radius: 10px;
        padding: 10px 32px 10px 56px;
    }
    .post .pjax article .article-entry li>ol, .post .pjax article .article-entry li>ul,.post .pjax article li>ol, .post .pjax article li>ul{
        padding-top: 5px;
        padding-bottom: 5px;
    }
    .post .pjax article .article-entry>ol>li, .post .pjax article .article-entry>ul>li,.post .pjax article>ol>li, .post .pjax article>ul>li{
        margin-bottom: auto;
        margin-left: auto;
    }
    .post .pjax article .article-entry li>ol>li, .post .pjax article .article-entry li>ul>li,.post .pjax article li>ol>li, .post .pjax article li>ul>li{
        margin-bottom: auto;
        margin-left: auto;
    }
    

    /* 背景图样式 */
    
    


    /*引用块样式*/
    

    /*文章列表背景图*/
    
    .nav-right:before {
        content: ' ';
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        opacity: 0.3;
        background: url("https://i.loli.net/2019/07/22/5d3521411f3f169375.png");
        background-repeat: no-repeat;
        background-position: 50% 0;
        -ms-background-size: cover;
        -o-background-size: cover;
        -moz-background-size: cover;
        -webkit-background-size: cover;
        background-size: cover;
    }
    

    
</style>







</html>
